cargo.git
10 years agoDrop wildcard crates.io warning
Steven Fackler [Sat, 16 Jan 2016 22:30:09 +0000 (14:30 -0800)]
Drop wildcard crates.io warning

The crates.io change is going through, so we don't want this warning
around after it lands.

10 years agoAuto merge of #2281 - rillian:doc-nocapture, r=alexcrichton
bors [Fri, 15 Jan 2016 21:36:03 +0000 (21:36 +0000)]
Auto merge of #2281 - rillian:doc-nocapture, r=alexcrichton

Although this is a feature of rustc's test harness and
not cargo's test driver, I can never remember how to
invoke it. Describing the switch in `cargo test --help`
makes it more discoverable.

10 years agoDocument --nocapture to reduce confusion running tests.
Ralph Giles [Fri, 15 Jan 2016 16:59:55 +0000 (08:59 -0800)]
Document --nocapture to reduce confusion running tests.

Although this is a feature of rustc's test harness and
not cargo's test driver, I can never remember how to
invoke it. Describing the switch in `cargo test --help`
makes it more discoverable.

10 years agoAuto merge of #2279 - alexcrichton:rerun-if-changed-rust-file, r=brson
bors [Fri, 15 Jan 2016 00:40:34 +0000 (00:40 +0000)]
Auto merge of #2279 - alexcrichton:rerun-if-changed-rust-file, r=brson

There was a failure mode of the handling of the rerun-if-changed directive where
it would rerun the build script twice before hitting a steady state of actually
processing the directives. The order of events that led to this were:

1. A project was built from a clean directory. Cargo recorded a fingerprint
   indicating this (for the build script), but the fingerprint indicated that
   the build script was a normal build script (no manually specified inputs)
   because Cargo had no prior knowledge.
2. A project was then rebuilt from the same directory. Cargo's new fingerprint
   for the build script now indicates that there is a custom list of
   dependencies, but the previous fingerprint indicates there wasn't, so the
   mismatch causes another rebuild.
3. All future rebuilds will agree that there are custom lists both before and
   after, so the directives are processed as one would expect.

This commit does a bit of refactoring in the fingerprint module to fix this
situation. The recorded fingerprint in step (1) is now recorded as a "custom
dependencies are specified" fingerprint if, after the build script is run,
custom dependencies were specified.

Closes #2267

10 years agoHandle rerun-if-changed directives in dependencies
Alex Crichton [Wed, 13 Jan 2016 01:37:57 +0000 (17:37 -0800)]
Handle rerun-if-changed directives in dependencies

There was a failure mode of the handling of the rerun-if-changed directive where
it would rerun the build script twice before hitting a steady state of actually
processing the directives. The order of events that led to this were:

1. A project was built from a clean directory. Cargo recorded a fingerprint
   indicating this (for the build script), but the fingerprint indicated that
   the build script was a normal build script (no manually specified inputs)
   because Cargo had no prior knowledge.
2. A project was then rebuilt from the same directory. Cargo's new fingerprint
   for the build script now indicates that there is a custom list of
   dependencies, but the previous fingerprint indicates there wasn't, so the
   mismatch causes another rebuild.
3. All future rebuilds will agree that there are custom lists both before and
   after, so the directives are processed as one would expect.

This commit does a bit of refactoring in the fingerprint module to fix this
situation. The recorded fingerprint in step (1) is now recorded as a "custom
dependencies are specified" fingerprint if, after the build script is run,
custom dependencies were specified.

Closes #2267

10 years agoAuto merge of #2276 - alexcrichton:fix-nightly, r=alexcrichton
bors [Tue, 12 Jan 2016 18:48:03 +0000 (18:48 +0000)]
Auto merge of #2276 - alexcrichton:fix-nightly, r=alexcrichton

Just some tweaks to compiler error messages

10 years agoAuto merge of #2228 - tbu-:pr_only_missing, r=alexcrichton
bors [Tue, 12 Jan 2016 17:50:34 +0000 (17:50 +0000)]
Auto merge of #2228 - tbu-:pr_only_missing, r=alexcrichton

10 years agoFix tests on nightly
Alex Crichton [Tue, 12 Jan 2016 17:47:31 +0000 (09:47 -0800)]
Fix tests on nightly

10 years agoAuto merge of #2269 - felixc:package-untracked-files, r=alexcrichton
bors [Tue, 12 Jan 2016 17:18:05 +0000 (17:18 +0000)]
Auto merge of #2269 - felixc:package-untracked-files, r=alexcrichton

The logic in `sources/path.rs` that finds files that are untracked by the version control system was incorrectly including files that *are* tracked, but had been modified without the modification being committed to Git.

This manifested itself as strange duplications of files (e.g. in `cargo package --list`), since they were listed once as tracked files, and once more as allegedly "untracked" ones. It also caused failures when trying to package the crate when files had been deleted, but the deletion was not yet committed to Git.

Fixes #2199

10 years agoFix listing of untracked files to not include tracked but modified ones
Felix Crux [Sun, 10 Jan 2016 19:47:02 +0000 (14:47 -0500)]
Fix listing of untracked files to not include tracked but modified ones

The logic in `sources/path.rs` that finds files that are untracked by the
version control system was incorrectly including files that *are* tracked,
but had been modified without the modification being committed to Git.

This manifested itself as strange duplications of files (e.g. in `cargo
package --list`), since they were listed once as tracked files, and once
more as allegedly "untracked" ones. It also caused failures when trying to
package the crate when files had been deleted, but the deletion was not
yet committed to Git.

Fixes #2199

10 years agoBump rand to 0.3.13
Felix Crux [Tue, 12 Jan 2016 00:00:05 +0000 (19:00 -0500)]
Bump rand to 0.3.13

10 years agoAuto merge of #2265 - dirk:dirk/include-publish-command-in-help, r=alexcrichton
bors [Mon, 11 Jan 2016 22:44:56 +0000 (22:44 +0000)]
Auto merge of #2265 - dirk:dirk/include-publish-command-in-help, r=alexcrichton

This is pretty commonly-used command, so I think it merits inclusion in the help text.

10 years agoAuto merge of #2257 - nrc:lib-template, r=alexcrichton
bors [Mon, 11 Jan 2016 18:15:34 +0000 (18:15 +0000)]
Auto merge of #2257 - nrc:lib-template, r=alexcrichton

10 years agoOnly treat missing crate lists as empty
Tobias Bucher [Fri, 18 Dec 2015 12:27:08 +0000 (12:27 +0000)]
Only treat missing crate lists as empty

The motivation is that errors other than "file not found" could lead to
the file being overwritten by an empty config, e.g. if the `open` call
is interrupted and returns `EINTR`, then this code would read an empty
config and write it back later on. This can probably happen for other
errors as well (`ENFILE`, ...).

10 years agoAdd publish command to list of commands in help text
Dirk Gadsden [Fri, 8 Jan 2016 22:40:02 +0000 (14:40 -0800)]
Add publish command to list of commands in help text

10 years agoMerge pull request #2260 from durka/patch-4
Brian Anderson [Wed, 6 Jan 2016 18:40:33 +0000 (10:40 -0800)]
Merge pull request #2260 from durka/patch-4

doc/manifest: add `cargo run --example`

10 years agoMerge pull request #2243 from felixc/zsh-completion-options
Brian Anderson [Wed, 6 Jan 2016 18:37:54 +0000 (10:37 -0800)]
Merge pull request #2243 from felixc/zsh-completion-options

Complete the definition of all options for zsh auto-completion

10 years agodoc/manifest: add `cargo run --example`
Alex Burka [Sun, 3 Jan 2016 02:04:17 +0000 (21:04 -0500)]
doc/manifest: add `cargo run --example`

Closes #2251. Should it be mentioned anywhere else as well?

10 years agoTweak the new project template to be more idiomatic.
Nick Cameron [Thu, 31 Dec 2015 03:12:56 +0000 (16:12 +1300)]
Tweak the new project template to be more idiomatic.

10 years agoComplete the definition of all options for zsh auto-completion
Felix Crux [Wed, 23 Dec 2015 03:57:03 +0000 (22:57 -0500)]
Complete the definition of all options for zsh auto-completion

All commands can now auto-complete all of the options they support.

10 years agoAuto merge of #2237 - sfackler:libc-0.2, r=alexcrichton
bors [Mon, 21 Dec 2015 16:09:43 +0000 (16:09 +0000)]
Auto merge of #2237 - sfackler:libc-0.2, r=alexcrichton

Also update everything else which removes all remaining libc 0.1
dependencies

10 years agoFix windows
Steven Fackler [Mon, 21 Dec 2015 04:47:04 +0000 (21:47 -0700)]
Fix windows

10 years agoWhitelist improper ctypes to support old rustc versions
Steven Fackler [Sun, 20 Dec 2015 23:15:18 +0000 (16:15 -0700)]
Whitelist improper ctypes to support old rustc versions

10 years agoBump libc to 0.2
Steven Fackler [Sun, 20 Dec 2015 22:58:55 +0000 (15:58 -0700)]
Bump libc to 0.2

Also update everything else which removes all remaining libc 0.1
dependencies

10 years agoAuto merge of #2225 - sgrif:sg-doctest-link-args, r=alexcrichton
bors [Sun, 20 Dec 2015 06:22:11 +0000 (06:22 +0000)]
Auto merge of #2225 - sgrif:sg-doctest-link-args, r=alexcrichton

It is entirely possible for a crate to have a build script that is simply
the equivalent to

```rustc
fn main() {
    println!("cargo:rustc-link-search=native=/some/path");
}
```

Without actually giving anything to link (for example, because the code
contains `#[link(name="foo")]`. In this case, we aren't actually passing
`-L` through when running doctests, even though they're passed when
compiling the main crate.

Fixes #1592

10 years agoRemove needless dylib check, add test
Sean Griffin [Sat, 19 Dec 2015 19:44:34 +0000 (12:44 -0700)]
Remove needless dylib check, add test

In this case the dylib check isn't actually doing anything useful, as
we're just appending search paths. Also adds a test for
8c65284b44337c6cfc003cedc8996e241ac678bd

10 years agoAuto merge of #2233 - gentoo90:bash-comp, r=alexcrichton
bors [Sat, 19 Dec 2015 18:29:47 +0000 (18:29 +0000)]
Auto merge of #2233 - gentoo90:bash-comp, r=alexcrichton

10 years agoAuto merge of #2235 - felixc:zsh-completion, r=alexcrichton
bors [Sat, 19 Dec 2015 18:09:48 +0000 (18:09 +0000)]
Auto merge of #2235 - felixc:zsh-completion, r=alexcrichton

Adds missing rustc, rustdoc, search, and uninstall subcommands.

Removes obsolete config-for-key and config-list subcommands that don't exist anymore.

10 years agoAdd missing subcommands to zsh auto-completion
Felix Crux [Sat, 19 Dec 2015 00:11:32 +0000 (19:11 -0500)]
Add missing subcommands to zsh auto-completion

Specifically, rustc, rustdoc, search, and uninstall.

10 years agoRemove obsolete commands from zsh auto-completion
Felix Crux [Sat, 19 Dec 2015 00:01:55 +0000 (19:01 -0500)]
Remove obsolete commands from zsh auto-completion

The config-for-key and config-list subcommands don't exist.

10 years agoBashcomp: complete --bin, --bench and --test
gentoo90 [Sat, 19 Dec 2015 11:12:39 +0000 (13:12 +0200)]
Bashcomp: complete --bin, --bench and --test

10 years agoAuto merge of #2232 - alexcrichton:unused, r=huonw
bors [Sat, 19 Dec 2015 03:34:56 +0000 (03:34 +0000)]
Auto merge of #2232 - alexcrichton:unused, r=huonw

This includes alexcrichton/toml-rs@39d77b6d which ensures that more unused
fields stick around when decoding TOML, allowing this to:

Closes #2230

10 years agoAuto merge of #2231 - felixc:docstrings-for-all, r=alexcrichton
bors [Sat, 19 Dec 2015 00:45:54 +0000 (00:45 +0000)]
Auto merge of #2231 - felixc:docstrings-for-all, r=alexcrichton

Almost all commands have info on what they are for, but a few were
missing it.

Also cleans up some copy/paste misdocumentation along the way.

10 years agoUpdate toml dependency to catch more unused keys
Alex Crichton [Sat, 19 Dec 2015 00:33:17 +0000 (16:33 -0800)]
Update toml dependency to catch more unused keys

This includes alexcrichton/toml-rs@39d77b6d which ensures that more unused
fields stick around when decoding TOML, allowing this to:

Closes #2230

10 years agoEnsure all subcommands have summary description documentation
Felix Crux [Fri, 18 Dec 2015 23:54:40 +0000 (18:54 -0500)]
Ensure all subcommands have summary description documentation

Almost all commands have info on what they are for, but a few were
missing it.

Also cleans up some copy/paste misdocumentation along the way.

10 years agoAuto merge of #2226 - tshepang:unused, r=alexcrichton
bors [Fri, 18 Dec 2015 20:40:35 +0000 (20:40 +0000)]
Auto merge of #2226 - tshepang:unused, r=alexcrichton

10 years agoAuto merge of #2224 - alexcrichton:rustc-dev, r=brson
bors [Fri, 18 Dec 2015 18:57:51 +0000 (18:57 +0000)]
Auto merge of #2224 - alexcrichton:rustc-dev, r=brson

This should allow compiling the specified target in the various profiles that
are available to it, e.g. bench or test in addition to the standard
dev.

Closes #2120

10 years agoAuto merge of #2223 - alexcrichton:better-dev-experience, r=brson
bors [Fri, 18 Dec 2015 18:43:14 +0000 (18:43 +0000)]
Auto merge of #2223 - alexcrichton:better-dev-experience, r=brson

Each test wants to be sure to reset HOME and remove CARGO_HOME from the
environment, but this was done inconsistently throughout the test suite. This
commit consolidates process creation so there's only one point for creating a
process ready to execute the Cargo that's being tested.

10 years agoAuto merge of #2227 - tbu-:pr_pycache, r=alexcrichton
bors [Fri, 18 Dec 2015 17:38:01 +0000 (17:38 +0000)]
Auto merge of #2227 - tbu-:pr_pycache, r=alexcrichton

Running `make` creates the `src/etc/__pycache__` directory which should
not be checked in.

10 years agoAdd __pycache__ to .gitignore
Tobias Bucher [Fri, 18 Dec 2015 12:28:08 +0000 (12:28 +0000)]
Add __pycache__ to .gitignore

Running `make` creates the `src/etc/__pycache__` directory which should
not be checked in.

10 years agoremove unused imports
Tshepang Lekhonkhobe [Fri, 18 Dec 2015 10:51:05 +0000 (12:51 +0200)]
remove unused imports

10 years agoAuto merge of #2219 - matklad:encodable-audit, r=alexcrichton
bors [Thu, 17 Dec 2015 23:08:10 +0000 (23:08 +0000)]
Auto merge of #2219 - matklad:encodable-audit, r=alexcrichton

@alexcrichton another preparation PR for #2196

I've removed obscure `metadata` field from `Target`. It is a breaking change (for read-manifest), but the field seemed cryptic, useless and untested :)

`Target` has a bunch of boolean fields:

```
    tested: bool,
    benched: bool,
    doc: bool,
    doctest: bool,
    harness: bool, // whether to use the test harness (--test)
    for_host: bool,
```

I guess they should not be included in serialized representation?

I will push commits for other `Encodable`s here.

10 years agoadd more fields to SerializedDependency
Aleksey Kladov [Thu, 17 Dec 2015 18:50:11 +0000 (21:50 +0300)]
add more fields to SerializedDependency

10 years agoadd more field to SerializedPackage
Aleksey Kladov [Wed, 16 Dec 2015 22:04:19 +0000 (01:04 +0300)]
add more field to SerializedPackage

10 years agoPass link search path to doctests even if build script gave no links
Sean Griffin [Thu, 17 Dec 2015 21:14:40 +0000 (14:14 -0700)]
Pass link search path to doctests even if build script gave no links

It is entirely possible for a crate to have a build script that is simply
the equivalent to

```rustc
fn main() {
    println!("cargo:rustc-link-search=native=/some/path");
}
```

Without actually giving anything to link (for example, because the code
contains `#[link(name="foo")]`. In this case, we aren't actually passing
`-L` through when running doctests, even though they're passed when
compiling the main crate.

Fixes #1592

10 years agoAllow specifying profiles to `cargo rustc`
Alex Crichton [Thu, 17 Dec 2015 18:10:59 +0000 (10:10 -0800)]
Allow specifying profiles to `cargo rustc`

This should allow compiling the specified target in the various profiles that
are available to it, e.g. bench or test in addition to the standard
dev.

Closes #2120

10 years agoConsolidate creating processes in tests
Alex Crichton [Thu, 17 Dec 2015 17:53:14 +0000 (09:53 -0800)]
Consolidate creating processes in tests

Each test wants to be sure to reset HOME and remove CARGO_HOME from the
environment, but this was done inconsistently throughout the test suite. This
commit consolidates process creation so there's only one point for creating a
process ready to execute the Cargo that's being tested.

10 years agoremove unused Encodable impl for Manifest
Aleksey Kladov [Wed, 16 Dec 2015 21:31:27 +0000 (00:31 +0300)]
remove unused Encodable impl for Manifest

10 years agoAuto merge of #2217 - alexcrichton:cleanup, r=alexcrichton
bors [Wed, 16 Dec 2015 21:14:02 +0000 (21:14 +0000)]
Auto merge of #2217 - alexcrichton:cleanup, r=alexcrichton

This From impl has been around for awhile.

10 years agoUse try! instead of CliError::from_boxed
Alex Crichton [Wed, 16 Dec 2015 21:11:26 +0000 (13:11 -0800)]
Use try! instead of CliError::from_boxed

This From impl has been around for awhile.

10 years agorefactor Target serialization
Aleksey Kladov [Wed, 16 Dec 2015 21:10:58 +0000 (00:10 +0300)]
refactor Target serialization

Remove obscure `metadata` field and implement proper Encodable for
TargetKind becase default one is not used.

10 years agoAuto merge of #2215 - JIghtuse:master, r=alexcrichton
bors [Wed, 16 Dec 2015 16:12:29 +0000 (16:12 +0000)]
Auto merge of #2215 - JIghtuse:master, r=alexcrichton

Fixes #2197

10 years agoetc: Fix error message about missing Cargo snapshot
Boris Egorov [Wed, 16 Dec 2015 07:49:33 +0000 (13:49 +0600)]
etc: Fix error message about missing Cargo snapshot

Fixes #2197

10 years agoAuto merge of #2208 - leodasvacas:clippy, r=alexcrichton
bors [Wed, 16 Dec 2015 04:51:56 +0000 (04:51 +0000)]
Auto merge of #2208 - leodasvacas:clippy, r=alexcrichton

Changes suggested by clippy. Mostly replacing `to_string()` with alternatives.

10 years agoclippy run
leonardo.yvens [Sat, 12 Dec 2015 18:19:11 +0000 (16:19 -0200)]
clippy run

10 years agoAuto merge of #2209 - felixc:master, r=alexcrichton
bors [Mon, 14 Dec 2015 18:37:03 +0000 (18:37 +0000)]
Auto merge of #2209 - felixc:master, r=alexcrichton

10 years agoUpdate zsh completion to include new 'install' command
Felix Crux [Mon, 14 Dec 2015 00:19:30 +0000 (19:19 -0500)]
Update zsh completion to include new 'install' command

10 years agoAuto merge of #2207 - fhartwig:unused-import, r=alexcrichton
bors [Sat, 12 Dec 2015 16:52:37 +0000 (16:52 +0000)]
Auto merge of #2207 - fhartwig:unused-import, r=alexcrichton

10 years agoRemove unused import that breaks the build on rust nightly
Florian Hartwig [Fri, 11 Dec 2015 19:21:24 +0000 (20:21 +0100)]
Remove unused import that breaks the build on rust nightly

10 years agoAuto merge of #2204 - alexcrichton:bump, r=brson
bors [Thu, 10 Dec 2015 15:29:43 +0000 (15:29 +0000)]
Auto merge of #2204 - alexcrichton:bump, r=brson

r? @brson

10 years agoBump to 0.8.0
Alex Crichton [Thu, 10 Dec 2015 15:26:17 +0000 (07:26 -0800)]
Bump to 0.8.0

10 years agoAuto merge of #2165 - psyomn:fix-2125-dup-bins, r=alexcrichton
bors [Tue, 8 Dec 2015 18:00:31 +0000 (18:00 +0000)]
Auto merge of #2165 - psyomn:fix-2125-dup-bins, r=alexcrichton

Alex, thank you for directing me to the right way.

I did some changes, and made it bail with the following message if duplicate binaries are detected:

````nocode
failed to parse manifest at `/home/psyomn/programming/rust/fork/badproj/Cargo.toml`

Caused by:
  rejected binary name e: only unique binary names are accepted
````

I also added a test to check for this! Let me know if anything needs fixing.

ref #2125

10 years agofix #2125: duplicate binary names will cause a bail
psyomn [Mon, 23 Nov 2015 00:47:30 +0000 (19:47 -0500)]
fix #2125: duplicate binary names will cause a bail

* adds duplicate target checks for bins, tests, examples, benches
* adds tests to test the above

10 years agoAuto merge of #2201 - matklad:serialized-dep, r=alexcrichton
bors [Tue, 8 Dec 2015 15:08:13 +0000 (15:08 +0000)]
Auto merge of #2201 - matklad:serialized-dep, r=alexcrichton

This hides `SerializedDependency` from general public, as requested [here](https://github.com/rust-lang/cargo/pull/1434#issuecomment-97886950). It also hides `SerializedManifest` which was (wrongly?) exposed.

This is required for #2196. I want to move in small steps this time, hence the separate PR.

Technically this break backwards compatibility, because `SerializedDependency` and `SerializedManifest` were public (`SerializedPackage` was private however). Are such changes allowed in cargo?

10 years agoimplement Encodable for Dependency
Aleksey Kladov [Mon, 7 Dec 2015 18:42:15 +0000 (21:42 +0300)]
implement Encodable for Dependency

SerializedDependency can be a private implementation detail now.

10 years agomake SerializedManifest private
Aleksey Kladov [Mon, 7 Dec 2015 18:37:57 +0000 (21:37 +0300)]
make SerializedManifest private

10 years agoAuto merge of #2192 - alexcrichton:search-cargo-home, r=brson
bors [Fri, 4 Dec 2015 18:24:57 +0000 (18:24 +0000)]
Auto merge of #2192 - alexcrichton:search-cargo-home, r=brson

Don't require PATH modifications for new cargo subcommands by looking
specifically in $CARGO_HOME/bin for installed commands.

Closes #2189

10 years agoProbe $CARGO_HOME/bin for subcommands by default
Alex Crichton [Thu, 3 Dec 2015 23:32:30 +0000 (15:32 -0800)]
Probe $CARGO_HOME/bin for subcommands by default

Don't require PATH modifications for new cargo subcommands by looking
specifically in $CARGO_HOME/bin for installed commands.

Closes #2189

10 years agoAuto merge of #2194 - steveklabnik:update_semver, r=alexcrichton
bors [Fri, 4 Dec 2015 17:25:32 +0000 (17:25 +0000)]
Auto merge of #2194 - steveklabnik:update_semver, r=alexcrichton

I realized that Cargo wasn't using the latest semver. This doesn't include my big nom refactoring, that will be 0.3.0.

10 years agoUpdate semver to 0.2.0
Steve Klabnik [Fri, 4 Dec 2015 15:56:34 +0000 (10:56 -0500)]
Update semver to 0.2.0

10 years agoAuto merge of #2134 - alexcrichton:build-script-input, r=brson
bors [Fri, 4 Dec 2015 00:06:21 +0000 (00:06 +0000)]
Auto merge of #2134 - alexcrichton:build-script-input, r=brson

Currently Cargo is quite conservative in how it determines whether a build
script should be run. The heuristic used is "did any file in the project
directory change", but this is almost always guaranteed to be too coarse
grained in situations like:

* If the build script takes a long time to run it's advantageous to run it as
  few times as possible. Being able to inform Cargo about precisely when a build
  script should be run should provide more robust support here.
* Build scripts may not always have all of their dependencies in-tree or in the
  crate root. Sometimes a dependency could be elsewhere in a repository and
  scripts need a method of informing Cargo about this (as currently these
  compiles don't happen then they should).

This commit adds this support in build scripts via a new `rerun-if-changed`
directive which can be printed to standard output (using the standard Cargo
metadata format). The value for this key is a path relative to the crate root,
and Cargo will only look at these paths when determining whether to rerun the
build script. Any other file changes will not trigger the build script to be
rerun.

Currently the printed paths may either be a file or a directory, and a directory
is deeply traversed. The heuristic for trigger a rerun is detecting whether any
input file has been modified since the build script was last run (determined by
looking at the modification time of the output file of the build script). This
current implementation means that if you depend on a directory and then delete a
file within it the build script won't be rerun, but this is already the case and
can perhaps be patched up later.

Future extensions could possibly include the usage of glob patterns in build
script paths like the `include` and `exclude` features of `Cargo.toml`, but
these should be backwards compatible to add in the future.

Closes #1162

10 years agoAuto merge of #2190 - sfackler:wildcard-pushback, r=alexcrichton
bors [Thu, 3 Dec 2015 18:28:24 +0000 (18:28 +0000)]
Auto merge of #2190 - sfackler:wildcard-pushback, r=alexcrichton

We missed a release somewhere, so the warning here won't hit stable
until December 11th.

r? @alexcrichton

10 years agoMove wildcard rejection date back 6 weeks
Steven Fackler [Thu, 3 Dec 2015 01:29:23 +0000 (17:29 -0800)]
Move wildcard rejection date back 6 weeks

We missed a release somewhere, so the warning here won't hit stable
until December 11th.

10 years agoAuto merge of #2186 - alexcrichton:transaction, r=brson
bors [Wed, 2 Dec 2015 00:50:33 +0000 (00:50 +0000)]
Auto merge of #2186 - alexcrichton:transaction, r=brson

Right now a `Bomb` struct is used to attempt to ensure that broken tarballs
don't escape, but this unfortunately doesn't work for when Cargo is terminated
via other means such as ctrl-c or abnormal termination. Instead the tarball is
constructed in a temporary location and then only moved to the final location
once all checks pass.

Closes #2173
cc #2177

10 years agoAuto merge of #2185 - alexcrichton:update, r=alexcrichton
bors [Mon, 30 Nov 2015 23:02:48 +0000 (23:02 +0000)]
Auto merge of #2185 - alexcrichton:update, r=alexcrichton

10 years agoUpdate plugin tests to nightly
Alex Crichton [Mon, 30 Nov 2015 19:21:04 +0000 (11:21 -0800)]
Update plugin tests to nightly

10 years agoAuto merge of #2184 - brandonson:master, r=alexcrichton
bors [Mon, 30 Nov 2015 20:16:08 +0000 (20:16 +0000)]
Auto merge of #2184 - brandonson:master, r=alexcrichton

When the crate to install is unspecified, we should really inform users about
where they can install from (other than crates.io).  This makes the message mention --path
and --git so that people know they exist.

10 years agoPackage/test tarballs in a temporary location
Alex Crichton [Mon, 30 Nov 2015 19:29:15 +0000 (11:29 -0800)]
Package/test tarballs in a temporary location

Right now a `Bomb` struct is used to attempt to ensure that broken tarballs
don't escape, but this unfortunately doesn't work for when Cargo is terminated
via other means such as ctrl-c or abnormal termination. Instead the tarball is
constructed in a temporary location and then only moved to the final location
once all checks pass.

Closes #2173
cc #2177

10 years agoImprove message with unspecified install target.
Brandon Sanderson [Mon, 30 Nov 2015 18:26:47 +0000 (10:26 -0800)]
Improve message with unspecified install target.

When the crate to install is unspecified, we should really inform users about
where they can install from (other than crates.io).  This makes the message mention --path
and --git so that people know they exist.

10 years agoAuto merge of #2176 - gentoo90:bash-comp, r=alexcrichton
bors [Sat, 28 Nov 2015 15:48:22 +0000 (15:48 +0000)]
Auto merge of #2176 - gentoo90:bash-comp, r=alexcrichton

* completion for `install`, `uninstall` and `rustdoc`
* completion for `--color` variants
* some missing options

10 years agoUpdate bash-completion
gentoo90 [Sat, 28 Nov 2015 08:56:06 +0000 (10:56 +0200)]
Update bash-completion

* completion for install, uninstall and rustdoc
* completion for --color variants
* some missing options

10 years agoAuto merge of #2168 - durka:patch-3, r=alexcrichton
bors [Tue, 24 Nov 2015 00:10:33 +0000 (00:10 +0000)]
Auto merge of #2168 - durka:patch-3, r=alexcrichton

In c9f1b9bf1e535a651f624897bd53a3f81af7501f the format of this example was changed from a `[dependencies.awesome]` section to the newly-recommended inline table syntax, but one of the attributes was left out.

I had to use some slightly weird formatting to keep the comment in place, is that OK?

10 years agorestore dependencies.awesome normal table
Alex Burka [Mon, 23 Nov 2015 23:54:49 +0000 (18:54 -0500)]
restore dependencies.awesome normal table

10 years agoinline tables must be on one line, because TOML
Alex Burka [Mon, 23 Nov 2015 21:58:17 +0000 (16:58 -0500)]
inline tables must be on one line, because TOML

10 years agodoc/manifest: fix "default-features" example
Alex Burka [Mon, 23 Nov 2015 20:30:10 +0000 (15:30 -0500)]
doc/manifest: fix "default-features" example

10 years agoAuto merge of #2167 - iirelu:vec-macro-consistency, r=alexcrichton
bors [Mon, 23 Nov 2015 17:22:24 +0000 (17:22 +0000)]
Auto merge of #2167 - iirelu:vec-macro-consistency, r=alexcrichton

~~Because it bugged me~~ It's better to have a single consistent way of using macros, and not mixing `{}` `[]` `()` blocks.

10 years agoMake usage of vec! macro consistent
iirelu [Mon, 23 Nov 2015 16:56:10 +0000 (16:56 +0000)]
Make usage of vec! macro consistent

Previously it was a mix of vec!() and vec![], as both work thanks to the
implementation of macros in Rust (even vec!{} would work), this makes
them all use the generally-accepted vec![] standard, which imitates the
syntax used for slices and is considered to make things clearer.

10 years agoAuto merge of #2166 - alexcrichton:clean-up-update, r=huonw
bors [Mon, 23 Nov 2015 05:31:49 +0000 (05:31 +0000)]
Auto merge of #2166 - alexcrichton:clean-up-update, r=huonw

I've noticed some slightly odd output from `cargo update` in the past and I
believe this cleanup should address what's going on under the hood. There were a
few minor issues with the previous implementation.

* When adding the previous graph to the list of changes, packages with multiple
  versions would override one another instead of all get added to one list.
* The `Ord` implementation for `SourceId` was actually incorrect in that it
  disagreed with the `Eq` implementation. This could end up causing subtle bugs
  here and there. dependening on what operators were used.

This tweak fixes both points and I believe should touch up the odd output I've
been seeing from `cargo update`.

10 years agoClean up the `cargo update` implementation a bit
Alex Crichton [Mon, 23 Nov 2015 05:18:59 +0000 (21:18 -0800)]
Clean up the `cargo update` implementation a bit

I've noticed some slightly odd output from `cargo update` in the past and I
believe this cleanup should address what's going on under the hood. There were a
few minor issues with the previous implementation.

* When adding the previous graph to the list of changes, packages with multiple
  versions would override one another instead of all get added to one list.
* The `Ord` implementation for `SourceId` was actually incorrect in that it
  disagreed with the `Eq` implementation. This could end up causing subtle bugs
  here and there. dependening on what operators were used.

This tweak fixes both points and I believe should touch up the odd output I've
been seeing from `cargo update`.

10 years agoAuto merge of #2160 - alexcrichton:bail-macro, r=huonw
bors [Fri, 20 Nov 2015 22:25:31 +0000 (22:25 +0000)]
Auto merge of #2160 - alexcrichton:bail-macro, r=huonw

This pattern showed up quite a few locations throughout the codebase but it
ended up meaning that there were some massive levels of indentation when you
actually get to the formatting string. This commit adds a new `bail!` macro
which shortens this idiom to help get the indentation under control throughout
the codebase.

10 years agoAdd a macro for `return Err(human(format!(...)))`
Alex Crichton [Fri, 20 Nov 2015 18:46:43 +0000 (10:46 -0800)]
Add a macro for `return Err(human(format!(...)))`

This pattern showed up quite a few locations throughout the codebase but it
ended up meaning that there were some massive levels of indentation when you
actually get to the formatting string. This commit adds a new `bail!` macro
which shortens this idiom to help get the indentation under control throughout
the codebase.

10 years agoAuto merge of #2159 - Manishearth:native-diag, r=alexcrichton
bors [Fri, 20 Nov 2015 18:29:44 +0000 (18:29 +0000)]
Auto merge of #2159 - Manishearth:native-diag, r=alexcrichton

r? @alexcrichton

10 years agoImprove diagnostics for multiple native links for the same package
Manish Goregaokar [Fri, 20 Nov 2015 16:11:05 +0000 (21:41 +0530)]
Improve diagnostics for multiple native links for the same package

10 years agoAuto merge of #2156 - alexcrichton:rebase-2058, r=alexcrichton
bors [Thu, 19 Nov 2015 22:37:17 +0000 (22:37 +0000)]
Auto merge of #2156 - alexcrichton:rebase-2058, r=alexcrichton

Touching up a few last comments before landing

10 years agoTouch up a few last minor comments
Alex Crichton [Thu, 19 Nov 2015 22:36:38 +0000 (14:36 -0800)]
Touch up a few last minor comments

10 years agoMerge branch 'cwd-fixes' of https://github.com/Kimundi/cargo
Alex Crichton [Thu, 19 Nov 2015 22:29:22 +0000 (14:29 -0800)]
Merge branch 'cwd-fixes' of https://github.com/Kimundi/cargo

10 years agoAuto merge of #2154 - alexcrichton:update, r=alexcrichton
bors [Thu, 19 Nov 2015 18:58:52 +0000 (18:58 +0000)]
Auto merge of #2154 - alexcrichton:update, r=alexcrichton

Closes #2152

10 years agoAuto merge of #2153 - carlosgaldino:cg-fix-uninstall, r=alexcrichton
bors [Thu, 19 Nov 2015 18:32:10 +0000 (18:32 +0000)]
Auto merge of #2153 - carlosgaldino:cg-fix-uninstall, r=alexcrichton

With this patch users can type `cargo help uninstall` or `cargo
uninstall -h` and it will display the `USAGE` message as it was supposed to.

Before the patch the command would display an error message about
invalid arguments.

Fixes #2138.

I also updated the man page.

10 years agoUpdate man page.
Carlos Galdino [Thu, 19 Nov 2015 16:49:45 +0000 (14:49 -0200)]
Update man page.

10 years agoFix `cargo-uninstall`.
Carlos Galdino [Thu, 19 Nov 2015 16:47:33 +0000 (14:47 -0200)]
Fix `cargo-uninstall`.

With this patch users can type `cargo help uninstall` or `cargo
uninstall -h` and it will display the `USAGE` message as it was supposed
to.

Before the patch the command would display an error message about
invalid arguments.

Fixes #2138.